package net.ge.mosq.jdo.entity;

import java.math.BigDecimal;
import java.util.List;

import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;

/**
 * @author noodles.wumu@gmail.com
 * @since 2012/06/27 17:44:17
 * @version 1.0
 */
@PersistenceCapable
public class AccountItem extends BaseEntity {

	private static final long serialVersionUID = -5867974004950031293L;

	@Persistent
	private String name;

	@Persistent
	private String code;

	@Persistent
	private String description;

	@Persistent
	private String currency;

	@Persistent
	private String fraction;

	@Persistent
	private String color;

	@Persistent
	private String notes;

	@Persistent
	private String placeholder;

	@Persistent
	private String type;

	@Persistent
	private Long parentId;

	@Persistent
	private String email;

	@NotPersistent
	private String parentName;

	@NotPersistent
	private BigDecimal transactionSum = BigDecimal.ZERO;

	@NotPersistent
	private int level;

	@NotPersistent
	private List<AccountItem> childenList;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code
	 *            the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the currency
	 */
	public String getCurrency() {
		return currency;
	}

	/**
	 * @param currency
	 *            the currency to set
	 */
	public void setCurrency(String currency) {
		this.currency = currency;
	}

	/**
	 * @return the fraction
	 */
	public String getFraction() {
		return fraction;
	}

	/**
	 * @param fraction
	 *            the fraction to set
	 */
	public void setFraction(String fraction) {
		this.fraction = fraction;
	}

	/**
	 * @return the color
	 */
	public String getColor() {
		return color;
	}

	/**
	 * @param color
	 *            the color to set
	 */
	public void setColor(String color) {
		this.color = color;
	}

	/**
	 * @return the notes
	 */
	public String getNotes() {
		return notes;
	}

	/**
	 * @param notes
	 *            the notes to set
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	/**
	 * @return the placeholder
	 */
	public String getPlaceholder() {
		return placeholder;
	}

	/**
	 * @param placeholder
	 *            the placeholder to set
	 */
	public void setPlaceholder(String placeholder) {
		this.placeholder = placeholder;
	}

	/**
	 * @return the type
	 */
	public String getType() {
		return type;
	}

	/**
	 * @param type
	 *            the type to set
	 */
	public void setType(String type) {
		this.type = type;
	}

	/**
	 * @return the parentId
	 */
	public Long getParentId() {
		return parentId;
	}

	/**
	 * @param parentId
	 *            the parentId to set
	 */
	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email
	 *            the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the parentName
	 */
	public String getParentName() {
		return parentName;
	}

	/**
	 * @param parentName
	 *            the parentName to set
	 */
	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	/**
	 * @return the transactionSum
	 */
	public BigDecimal getTransactionSum() {
		return transactionSum;
	}

	/**
	 * @param transactionSum
	 *            the transactionSum to set
	 */
	public void setTransactionSum(BigDecimal transactionSum) {
		this.transactionSum = transactionSum;
	}

	/**
	 * @return the level
	 */
	public int getLevel() {
		return level;
	}

	/**
	 * @param level
	 *            the level to set
	 */
	public void setLevel(int level) {
		this.level = level;
	}

	/**
	 * @return the childenList
	 */
	public List<AccountItem> getChildenList() {
		return childenList;
	}

	/**
	 * @param childenList
	 *            the childenList to set
	 */
	public void setChildenList(List<AccountItem> childenList) {
		this.childenList = childenList;
	}
}
